Bookings API

Bookings API

The workplacemanagement API allows you to do the following with Asset records:

GET
Get All Bookings | Authenticated
Get All Bookings | URL
Get One Booking | Authenticated
Get One Booking | URL
Result (two records)

POST (create)
POST | Authenticated
Result


PUT (update)
PUT | Authenticated
Result


DELETE
Delete | Authenticated
Result

GET

Get All Bookings | Authenticated

Syntax:

GET {Domain}/workplacemanagement4/{ProjectName}/api/Booking
e.g.

GET http://localhost/workplacemanagement4/ProjectName/api/Booking
GET https://domain.com/workplacemanagement4/MainOffice/api/Booking


Get All Bookings | URL
Syntax:

{Domain}/workplacemanagement4/{ProjectName}/api/Booking?apikey={APIKey}
e.g.

http://localhost/workplacemanagement4/ProjectName/api/Booking?apikey=aP2bjYAeeYrUx0hPYQ
https://domain.com/workplacemanagement4/MainOffice/api/Booking?apikey=l4MZnM2Y58lwVgubQn


Get One Booking | Authenticated
Syntax:

GET {Domain}/workplacemanagement/{ProjectName}/api/Booking/{id}
e.g.

GET http://localhost/workplacemanagement4/ProjectName/api/Booking/20191104110235817
GET https://domain.com/workplacemanagement4/MainOffice/api/Booking/20180921194845701


Get One Booking | URL
Syntax:

{Domain}/workplacemanagement4/{ProjectName}/api/Booking/{id}?apikey={APIKey}
e.g.

http://localhost/workplacemanagement4/ProjectName/api/Booking/20180921194845701?apikey=aP2bjYAeeYrUx0hPYQ


Result (two records)
[
{
"starttime": "2020-03-11",
"endtime": "2020-03-11 11:59:00 PM",
"description": "",
"desk_id": "20180924101123994",
"createdby": "",
"employee_id": "201503050132020222",
"booking_id": "20200207093434164",
"category": "",
"title": "",
"bookingtype": "",
"recurrence": ""
},
{
"starttime": "2020-03-11",
"endtime": "2020-03-11 11:59:00 PM",
"description": "",
"desk_id": "20180918160644525",
"createdby": "",
"employee_id": "201504221052302424",
"booking_id": "20200207093457905",
"category": "",
"title": "",
"bookingtype": "recurrence",
"recurrence": "Tu,We"
}
]


POST (create)
When creating a new record, the unique booking ID will be automatically created and does not need to be included as parameter.

POST | Authenticated
Syntax:

POST {Domain}/workplacemanagement4/{ProjectName}/api/Booking/?{parameter1:value1}&{parameter2}:{value2}...
e.g.

POST http://localhost/workplacemanagement4/ProjectName/api/Booking/?name=Printer17&Manufacturer=Canon
POST https://domain.com/workplacemanagement4/ProjectName/api/Booking/?name=Microwave&category=Kitchen&size=medium
Result
[
{
"id": "2020020726122423"
},
{
"status": "Booking record successfully added"
}
]


PUT (update)
PUT | Authenticated

Syntax:

PUT {Domain}/workplacemanagement4/{ProjectName}/api/Booking/{id}?{parameter1:value1}&{parameter2:value2}...
e.g.

PUT http://localhost/workplacemanagement4/ProjectName/api/Booking/2020020679547848?status=broken&dateupdated=2020-02-07
PUT https://domain.com/workplacemanagement4/MainOffice/api/Booking/2020020619325472?employee_id=2018928791&name=Personal Printer
Result
[
{
"status": "Booking record successfully updated"
}
]


DELETE
Delete | Authenticated

Syntax:

DELETE {Domain}/workplacemanagement4/{ProjectName}/api/Booking/{id}
e.g.

DELETE http://localhost/workplacemanagement4/ProjectName/api/Booking/201711300130174407
DELETE https://domain.com/workplacemanagement4/MainOffice/api/Booking/2020020630313932
Result
[
{
"status": "Booking record successfully deleted"
}
]

© Copyright 2024 WorkplaceManagement - All Rights Reserved

Page was designed with Mobirise web themes